package com.study.common.core.domain.model;

import lombok.Data;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
public class RegistrationInformation {

    /**
     * 注册类型：1、手机,2、邮箱
     */
    @NotNull
    private Integer type;

    /**
     * 区号
     */
    private String areaCode;

    /**
     * 注册手机号码
     */
    private String phone;

    /**
     * 注册手机邮箱
     */
    @Pattern(regexp = "[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\\\.[a-zA-Z0-9-]+)*", message = "邮箱校验不通过")
    private String email;

}
